package com.hpeng.sys.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.hpeng.sys.dao.CategorysDao;
import com.hpeng.sys.model.Category;
import com.hpeng.util.GenericDaoImpl;

@Component("categorysDao")                        
public class CategorysDaoImpl extends GenericDaoImpl<Category,String> implements CategorysDao{
	public List<Category> getCategoryByParentId(String categoryId){
		List<Category> categorys = null;
		categorys = getByHql("from Category category where category.catid like '"+categoryId+"%'");
		return categorys;
	}
	public List<Category> getAllCategory(){
		return getAll();
	}
}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  